package LeetCodeP;

/**
 * @Author zengxianlong
 * @Date 2021/12/21 17:42
 * @Version 1.0
 */
public class SList {
private SListNode head;

private SListNode temp;

public void sortList() {
   SListNode node = head, i, j;

   head = node;

   i = node;

   j = node.next;

   while (i.next != null) {
      while (j.next != null) {
         if ((Integer) i.item < (Integer) j.item) {
            temp = i.next;
            i.next = j.next;
            j.next = temp;
         }
         j = j.next;
      }
      i = i.next;
   }
}
}
